// 类型断言 as
// 开发者比ts的类型推断更加清楚变量的类型
const aLink = document.querySelector('#Link') as HTMLAnchorElement
aLink.href = 'qweeq'

document.querySelector('a')
// 不要乱用类型断言
function log(foo: string | number) {
  console.log((foo as number).toFixed(2))
}
log(100)
log('100')

export { log }
